package project.ekko.wow;

import java.awt.event.KeyEvent;
import java.util.concurrent.ThreadLocalRandom;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.LockSupport;

public class Fisher {

    public static void gotoFish() {
        if (!reel()) {
            return;
        }
        LockSupport.parkNanos(TimeUnit.MILLISECONDS.toNanos(ThreadLocalRandom.current().nextInt(1800, 2300)));
        cast();
    }

    public static boolean reel() {
        return WOWAction.sendMessage(KeyEvent.VK_F12);
    }

    public static boolean cast() {
        return WOWAction.sendMessage(KeyEvent.VK_1);
    }

}
